<?php

/**
 * Created by PhpStorm.
 * User: songs
 * Date: 2019/10/15
 * Time: 9:24
 */

namespace App\Services\Api;

use App\admin\Service\OA;
use App\Jobs\Fun;
use App\Models\Admin\OrderBaleModel;
use App\Models\Admin\OrderCheckModel;
use App\Models\Admin\OrderTempModel;
use App\Models\LogModel;
use App\Models\OrderCommentModel;
use App\Models\User\UserLevelModel;
use App\Models\User\UserModel;
use App\Services\OrdersPayService;
use Illuminate\Http\Request;
use App\Models\MoneyBilModel;
use DB;
use App\Models\User\UserOrdersModel;
use App\Services\Msg\MsgService;

/// App\Services\Api\CallMsg@
class User extends ApiBase
{

    public function getuserinfo(Request $request){
        $uid=$request->input('uid');
        $user=UserModel::getinfo($uid);
        $info=[
            'head' => $user['head'],
            'name' => $user['name'],
            'id'=>$user['id']
        ];
        OA::Json(0,$info);
    }

    /**
     *获取当前用户等级
    */
    public function getuserLevel(){
        OA::Json(0,UserLevelModel::getUserLevel(OA::$user->getId()));
    }
}
